package com.mvu.banana.internal.builder;

import com.mvu.banana.domain.stub.Credential;
import com.mvu.banana.domain.stub.Profile;
import com.mvu.banana.internal.server.BuilderBase;
import com.mvu.banana.internal.server.CredentialBuilder;

public class CredentialBuilderStub extends BuilderBase<Credential>{
  
  public CredentialBuilderStub(){
    super(new Credential());
    init();
  }
  
  public void init(){
  }
  
  public CredentialBuilder withUsername(String p0){
    product.setUsername(p0);
    return (CredentialBuilder) this;
  }
  
  public CredentialBuilder withPassword(String p0){
    product.setPassword(p0);
    return (CredentialBuilder) this;
  }
  
  public CredentialBuilder withPermissions(String... p0){
    for(String item : p0){
      product.getPermissions().add(item);
    };
    return (CredentialBuilder) this;
  }
  
  public CredentialBuilder withProfiles(Profile... p0){
    for(Profile item : p0){
      item.setCredential(product);
    };
    return (CredentialBuilder) this;
  }
}